package com.example.newproject_overseas

import android.annotation.SuppressLint
import android.app.Application
import android.content.Context
import android.util.Log
import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts
import com.example.composewebview.Utils.PermissionUtil.checkCameraPermission
import com.example.composewebview.Utils.PermissionUtil.checkPhotosPermission
import com.example.composewebview.Utils.PermissionUtil.checkStoragePermission
import com.example.composewebview.Utils.PermissionUtil.reqPermission
import com.example.newproject_overseas.ViewModel.LoginViewModel
import com.example.newproject_overseas.util.getAndroidId
import com.example.newproject_overseas.util.getGoogleAdvertisingId

class MyApplication: Application() {

    companion object {

        var gaid_cur = "jjjjjj"
        var aid  = "ddddddd"
        @SuppressLint("StaticFieldLeak")
        lateinit var loginVM : LoginViewModel
        lateinit var appContext: Context
        lateinit var ctx_sPerLauncher: ActivityResultLauncher<String>        // 声明为成员变量
        lateinit var ctx_mPerLauncher: ActivityResultLauncher<Array<String>> // 声明为成员变量

    }

    override fun onCreate() {
        super.onCreate()
        appContext = applicationContext // Replace with your application context
        aid = getAndroidId(appContext);
        getGoogleAdvertisingId(appContext) { gaid ->
            gaid_cur = gaid;

        }

    }

}